package com.itdfq.logtest.test;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;

import java.util.List;

/**
 * @author: GodChin
 * @date: 2022-06-09 18:23
 * @mark:
 */
public class Demo1 {
    public static void main(String[] args) {
        String msg ="[\"https://s-cf-tw.shopeesz.com/file/d2cc04fdbb57c83fc0e83e8ae7c7e3a0\",\"https://s-cf-tw.shopeesz.com/file/8737c97556de145ccfb3c1a92a533ff5\",\"https://s-cf-tw.shopeesz.com/file/c8eabfd52bdcd77f8fe2cff27d2e98c7\"]";
        String[] split = msg.split(",");
        for(String s : split){
            System.out.println(s);
        }
        JSONArray array = JSONArray.parseArray(msg);
        JSONArray list = JSON.parseArray(msg);
        List<String> stringList = list.toJavaList(String.class);
        System.out.println(list);
        System.out.println(list.get(0));
        System.out.println("-----");
        System.out.println(stringList.toString());
    }
}
